<?php
namespace Common\Mysql;
class TagsMysql extends CommonMysql {

    public function addTag($title) {
        return $this->addRecord(array(
            'title'     =>  strtolower($title),
            'nickname'  =>  $title,
            'num'       =>  0,
            'createtime'=>  NOW_TIME,
            'updatetime'=>  NOW_TIME,
            'status'    =>  1,
        ));
    }

    public function getByTitle($title) {
        return $this->where(array('title'=>strtolower($title)))->find();
    }
}
?>

